1. Field of the Invention
The invention relates to a correction method and device, and more particularly to a correction method and device for correcting a time value of a real time clock (RTC).
2. Description of the Related Art
FIG. 1 is a schematic diagram of a conventional device, which controls a real time clock (RTC). The device 100 controls a RTC 180 and comprises a crystal 110, a second counter 120, a minute counter 130, an hour counter 140, a day counter 150, a year counter 160, and a processor 170. Assume for the purposes of explanation that the frequency generated by the crystal 110 is 32768 Hz.
The second counter 120 counts pulses from the frequency generated by the crystal 110. When the accumulated count of the second counter 120 reaches 32768, the second counter 120 outputs a notification signal to the minute counter 130 for every 32768 pulses of the frequency. Thus, the accumulated count of the minute counter 130 is increased one unit from zero and the second counter 120 terminates a preceding count and begins a new count. When the accumulated count of the minute counter 130 reaches 60, the minute counter 130 outputs a notification signal to the hour counter 140. Thus, the accumulated count of the hour counter 140 is increased one unit from zero and the minute counter 130 terminates a preceding count and begins a new count.
When the accumulated counts of the hour counter 140 reaches 24, the hour counter 140 outputs a notification signal to the day counter 150. Thus, the accumulated count of the day counter 150 is increased one unit from zero and the hour counter 140 terminates a preceding count and begins a new count. When the accumulated counts of the day counter 150 reaches a preset value, the day counter 150 outputs a notification signal to the year counter 160. Thus, the accumulated count of the year counter 160 is increased one unit from zero and the day counter 150 terminates a preceding count and begins a new count.
When the accumulated count of the second counter 120, the minute counter 130, the hour counter 140, the day counter 150, or the year counter 160 is changed, the corresponding counter notices a processor 170 for updating time of a real time clock (RTC) 180.
Thus the accuracy of the RTC 180 is determined by the frequency generated by the crystal 110. The frequency generated by the crystal 110, however, is easily altered by two causes, temperature and frequency drift, thus, crystal 110 generates an incorrect frequency.
The frequency generated by the crystal 110 changes with environmental temperature. The frequency generated by the crystal 110 has a drift error between +20 ppm and −20 ppm due to manufacturing procedures. If the crystal 110 generates an incorrect frequency, the RTC 180 time is incorrect.
To solve the described problems, a conventional method corrects the accumulated count of the second counter 120. As shown in FIG. 2, the device 200 comprises a correction register 290 for correcting an RTC 280. A processor 270 updates the accumulated count of a second counter 220 according to the stored value of the correction register 290.
Although the RTC 280 can maintain a correct time by use of a conventional method, the correction register 290, and additional element, is required for storage of correct values. Thus, device cost is increased and the usable space is reduced.